其他
ERP分析中如何自动删除休息阶段的脑电数据?
被试自主决定
强制休息一定时长和被试自主决定
研究者决定
% Transform "boundary" to "-99"
EEG = pop_creabasiceventlist( EEG , 'AlphanumericCleaning', 'on', 'BoundaryNumeric', { -99 }, 'BoundaryString',{ 'boundary' } );
% Remove segments of EEG during the break periods in between trial blocks (defined as 2 seconds or longer in between successive stimulus event codes)
EEG = pop_erplabDeleteTimeSegments( EEG , 'displayEEG', 0, 'endEventcodeBufferMS', 2000, 'ignoreUseEventcodes', [111 112 121 122 211 212 221 222], 'ignoreUseType', 'Use', 'startEventcodeBufferMS', 2000, 'timeThresholdMS', 2000 );
由于代码仅适用于数值,但由于脑电采集设备的第一个Marker或Evencodes为 boundary ,为导致后面的代码没法正常运行,因此需要将boundary 转化为一个相应的数值,如:-99。即代码:
EEG = pop_creabasiceventlist( EEG , 'AlphanumericCleaning', 'on', 'BoundaryNumeric', { -99 }, 'BoundaryString',{ 'boundary' } );
EEG = pop_erplabDeleteTimeSegments( EEG , 'displayEEG', 0, 'endEventcodeBufferMS', 2000, 'ignoreUseEventcodes', [111 112 121 122 211 212 221 222], 'ignoreUseType', 'Use', 'startEventcodeBufferMS', 2000, 'timeThresholdMS', 2000 );
EEG = pop_creabasiceventlist( EEG , 'AlphanumericCleaning', 'on', 'BoundaryNumeric', { -99 }, 'BoundaryString',{ 'boundary' } );
%Remove segments of EEG during the break periods in between trial blocks (defined as 2 seconds or longer in between successive stimulus event codes)
EEG = pop_erplabDeleteTimeSegments( EEG , 'displayEEG', 0, 'endEventcodeBufferMS', 3000, 'ignoreUseEventcodes',[11 21 22 31 41 43 51 53 61 63 71 73 77 88 99], 'ignoreUseType', 'Use', 'startEventcodeBufferMS', 3000, 'timeThresholdMS', 3000);
使用代码后:
<本篇完>